package com.dingpeikeji.quickdeer.modules.base.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dingpeikeji.quickdeer.core.common.service.CrudService;
import com.dingpeikeji.quickdeer.core.modules.sys.entity.User;
import com.dingpeikeji.quickdeer.modules.base.dao.FUserDao;

@Service
@Transactional(readOnly = true)
public class FrontUserService extends CrudService<FUserDao, User>{
	@Autowired
	private FUserDao fUserDao;
	public User findUser(String username,String password) {
		User euser = fUserDao.findUser(username, password);
		return euser;
	}
	public String getLoginName(String unionid) {
		return fUserDao.getLoginName(unionid);
	}
	public void updateUserByUnionID(String unionid, String loginName) {
		fUserDao.updateUserByUnionID(unionid,loginName);
	}
	public User getUserByLoginName(String loginName) {
		return fUserDao.getUserByLoginName(loginName);
	}
	public String getLoginNameByQqOpenid(String openid) {
		return fUserDao.getLoginNameByQqOpenid(openid);
	}
	public void updateUserByOPenID(String openid, String loginName) {
		fUserDao.updateUserByOPenID(openid,loginName);
	}
	public String getUserImage(String userid) {
		return fUserDao.getUserImage(userid);
	}
	public void updateDataPath(String dataPath, String userid) {
		fUserDao.updateDataPath(dataPath,userid);
	}
	public void saveOpenId(String openid, String id) {
		fUserDao.saveOpenId(openid,id);
	}
	public User getUserByOpenId(String openid) {
		return fUserDao.getUserByOpenId(openid);
	}
	
}
